package com.xa.xamall.framework.mapper.custom;

import com.xa.xamall.framework.mapper.provider.ExistsProvider;
import org.apache.ibatis.annotations.SelectProvider;

/**
 * 自定义验证接口
 * @param <T>
 */
public interface ExistsMapper<T> {

    /*@Options(
            useGeneratedKeys = true,
            keyProperty = "id"
    )*/
    @SelectProvider(
            type = ExistsProvider.class,
            method = "dynamicSQL"
    )

    /**
     * 验证某字段值是否存在
     * @param t 查询实体条件
     */
    int exists(T t);

}
